#include "PrecompiledHeader.h"
#include "IniItem.h"

/*--------------------------------------------------------------------------*/

IniFileItem::IniFileItem(const std::string& name, const std::string& value) :
	m_name(name)
{
	std::stringstream ss;

	ss << value;
	ss >> m_fltValue;

	m_intValue = static_cast<int>(m_fltValue);

	m_strValue = value;
}

/*--------------------------------------------------------------------------*/

IniFileItem::~IniFileItem()
{
}

/*--------------------------------------------------------------------------*/

const int& IniFileItem::GetInt() const
{
	return m_intValue;
}

/*--------------------------------------------------------------------------*/

const float& IniFileItem::GetFloat() const
{
	return m_fltValue;
}

/*--------------------------------------------------------------------------*/

const std::string& IniFileItem::GetString() const
{
	return m_strValue;
}

/*--------------------------------------------------------------------------*/

const std::string& IniFileItem::GetName() const
{
	return this->m_name;
}

/*--------------------------------------------------------------------------*/

